<?php
/**
 * Created by PhpStorm.
 * User: bxm
 * Date: 2022/6/24
 * Time: 13:40
 */

namespace app\common\model\worker;


use app\common\model\BaseModel;

class CustomerBudgetModel extends BaseModel
{
    protected $table = 'customer_budget';
    public function add($data)
    {
        $info = self::create($data);
        return $info;

    }
    public function getList($where=[],$field="*",$order= ['id' => 'desc'],$pageSize='',$pageNumber=''){

        if($pageSize){
            $res = $this->where($where)->order($order)->field($field)->paginate($pageNumber, false, ['page' => $pageSize]);
        }else{
            $res = $this->where($where)->order($order)->field($field)->select()->toArray();
        }



        return $res;

    }
}